package cn.stylefeng.guns.modular.cb.mapper;

import cn.stylefeng.guns.modular.cb.entity.CbResumeDelivery;
import cn.stylefeng.guns.modular.cb.model.params.CbResumeDeliveryParam;
import cn.stylefeng.guns.modular.cb.model.result.CbResumeDeliveryResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ss
 * @since 2021-01-19
 */
public interface CbResumeDeliveryMapper extends BaseMapper<CbResumeDelivery> {

    /**
     * 获取列表
     *
     * @author ss
     * @Date 2021-01-19
     */
    List<CbResumeDeliveryResult> customList(@Param("paramCondition") CbResumeDeliveryParam paramCondition);

    /**
     * 获取map列表
     *
     * @author ss
     * @Date 2021-01-19
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") CbResumeDeliveryParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author ss
     * @Date 2021-01-19
     */
    Page<CbResumeDeliveryResult> customPageList(@Param("page") Page page, @Param("paramCondition") CbResumeDeliveryParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author ss
     * @Date 2021-01-19
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") CbResumeDeliveryParam paramCondition);

    /**
     * 职位投递列表
     * @param page
     * @param positionId
     * @return
     */
    Page<CbResumeDeliveryResult> findDeliverList(@Param("page") Page page, @Param("positionId") Long positionId);

    /**
     * 每日新增投递统计
     * @return
     */
    List<Map<String,Object>> queryDateCount(@Param("startDate")String startDate, @Param("countArr")String[] countArr);

    /**
     * 是否已投递
     * @param paramCondition
     * @return
     */
    Integer getCountByUser(@Param("paramCondition") CbResumeDeliveryParam paramCondition);
}
